<template>
  <div>
    <p>BindChildA</p>
    <p>foo: {{ foo }}</p>
    <p>childA的$attrs: {{ $attrs }}</p>
    开始引用B
    <bind-child-b v-bind="$attrs"></bind-child-b>
  </div>
</template>

<script>
  import BindChildB from './BindChildB'
  export default {
    name: 'BindChildA',
    components:{
      BindChildB
    },
    inheritAttrs: false, // 可以关闭自动挂载到组件根元素上的没有在props声明的属性
    props: {
      foo: String // foo作为props属性绑定
    },
    created () {
      console.log(this.$attrs); // { "boo": "Html", "coo": "CSS", "doo": "Vue", "title": "前端工匠" }
    }
  }
</script>

<style scoped>

</style>
